<template>
<div class='demo'>

<router-view class="view"></router-view>

<van-tabbar route v-model="active"  active-color="#3498db" fixed>
  <van-tabbar-item :to="model.to" v-for="(model,index) in MobilePhone" :key="index" :icon="model.icon">
       {{model.title}}
  </van-tabbar-item>
</van-tabbar>
</div>
</template>


<script>
export default {
name:'Main',
components:{
},
    data(){
    return{
        active:0,
        MobilePhone:[
            {
                title:"首页",
                icon:"home-o",
                to:'/home'
            },
            {
                title:"分类",
                icon:"apps-o",
                to:'/type'
            },
            {
                title:"签到",
                icon:"underway-o",
                to:'/sign'
            },
            {
                title:"购物车",
                icon:"shopping-cart-o",
                to:'/shopingCart'
            },
            {
                title:"个人中心",
                icon:"manager-o",
                to:'/personNal'
            }
        ]
    }
    },
    methods:{
   

    },

}
</script>


<style lang='less' scoped>

.demo{
    .view{
        height: calc(100vh - 52px);
        background-color: #ecf0f18a;
        // border: 1px solid red;
    }

   

}

</style>